home *** CD-ROM | disk | FTP | other *** search
- Path: nic.wat.hookup.net!news
- From: xenon@the-fix.sos.on.ca
- Newsgroups: comp.lang.c
- Subject: Re: Streams
- Date: Wed, 24 Jan 1996 21:54:52 GMT
- Organization: HookUp Communication Corporation, Waterloo, Ontario, CANADA
- Message-ID: <4e6ame$i2d@nic.wat.hookup.net>
- References: <DLnvnp.229@rci.ripco.com>
- NNTP-Posting-Host: slip2.sos.on.ca
- X-Newsreader: Forte Free Agent 1.0.82
-
- mambuhl@ripco.com (Martin Ambuhl) wrote:
-
- >xenon@the-fix.sos.on.ca
- >in <4e0lp3$lkf@nic.wat.hookup.net> writes:
-
- >>HI, im having some trouble getting my program to write to streams...
- >>ex:
-
- >Since your program appears to have no errors, and compiles and runs
- >just fine for me with bcc or gcc, I would suggest that you re-install
- >the compiler, making sure that you skip no steps. Dot every i and cross
- >every t.
-
- Ahhh...the joys of having the original disks.....
- Could this be a options/settings problem in BTC++?
- >>#include <stdio.h>
-
- >>int main(void)
- >>{
- >> FILE *stream;
- >> int i = 100;
- >> char c = 'C';
- >> float f = 1.234;
-
- >> /* open a file for update */
- >> stream = fopen("DUMMY.FIL", "w+");
-
- >> /* write some data to the file */
- >> fprintf(stream, "%d %c %f", i, c, f);
-
- >> /* close the file */
- >> fclose(stream);
- >> return 0;
- >>}
-
-
- >> This example taken out of the Borland Help library should work fine.
- >>Yet, nothing is written to the file "dummy.fil". although the file is
- >>created. I have tried running my comiler from Dos and Win95 to no
- >>avail. My stream problem is no just centered around the disk file
- >>streams, but also stdout, and stderr. Strangely though, my read() and
- >>write() functions work just fine.
- >>thankx
- >>xenon@the-fix.sos.on.ca
- >
- >--
- >* Martin Ambuhl net: mambuhl@ripco.com
- >* Chicago, IL (USA)
-
-
-